<template>
  <header>
    <a class="navbar-toggle">
      <span class="navbar-toggle-item"></span>
      <span class="navbar-toggle-item"></span>
      <span class="navbar-toggle-item"></span>
    </a>
    <span class="page-name">{{getTabName}}</span>
  </header>

</template>

<script>
  export default {
    name: "topheader",
    props: ['tabName'],
    computed:{
      getTabName(){
        switch(this.tabName){
          case 'All':return '全部';
          case 'Good':return '精华';
          case 'Share':return '分享';
          case 'Ask':return '问答';
          case 'Job':return '招聘';
          case 'Dev':return '客户端测试';
          default:return this.tabName;
        }
      }
    }
  }
</script>

<style scoped>
  header {
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
  }

  .page-name {
    font-weight: 800;
    font-size: 18px;
    color: #395692;
    line-height: 60px;
  }

  .navbar-toggle {
    float: left;
    border: 1px solid #ccc;
    height: 32px;
    width: 38px;
    background: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 13px 15px;
    padding: 0;
  }

  .navbar-toggle:hover {
    background: #f0f0f0;
  }

  .navbar-toggle .navbar-toggle-item {
    display: block;
    height: 2px;
    width: 22px;
    margin: 6px 8px;
    background: #aaa;
  }

</style>
